<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>12312313</title>
<link href="__ROOT__/css/common.css" type="text/css" rel="stylesheet">
<link href="__ROOT__/css/BigSlide.css" type="text/css" rel="stylesheet">
<script src="__ROOT__/js/jquery.js" type="text/javascript"></script>
<script src="__ROOT__/js/BigSlide.js" type="text/javascript"></script>
<script type="text/javascript">


$(function() {

        $('#testSubmit').click(function(){
        $.ajax({  
            type: "post",  
            url: "__URL__/getscore",  
            dataType: 'json',
            data: {q1:$("input[name='q1']:checked").val(),q2:$("input[name='q2']:checked").val(),q3:$("input[name='q3']:checked").val(),q4:$("input[name='q4']:checked").val(),q5:$("input[name='q5']:checked").val(),q6:$("input[name='q6']:checked").val(),q7:$("input[name='q7']:checked").val(),q8:$("input[name='q8']:checked").val()},
            beforeSend: function(XMLHttpRequest){   
            },  
            success: function(json){
                if(json.data == 1){
                    window.location.href='testscore?code='+ json.info;
                }
            } 
        })
    })
})      

</script>

</head>

<body>
<div id="Big_Slide_box">
	<div class="Big_Slide_Head">
        Your Risk Preference
        <span class="btn btn-primary right"><i class="fa fa-times"></i></span>
    </div>
    <div id="Big_Slide_Tab">
    	
    </div>
    
	<div id="Big_Slide">
    	<ul>
    	    
    	    
  <?php foreach($ques as $k => $v):?>
    <li id="Big_Slide_<?php $qnum=$k+1; echo $qnum;?>">
        <h1><?php $proportion=$v['proportion'];echo $v['title']?></h1>
          <?php foreach($v['option'] as $k => $v):?>
             <p><input name="q<?php echo $qnum;?>" type="radio" value="<?php echo $v["score"]*$proportion;?>"><span><?php echo $v['option'];?></span></p>
         <?php endforeach?>
        <div class="clear"></div>
    </li>   
<?php endforeach?>


        </ul>
        <div class="clear"></div>
    </div>
    <div class="Big_Slide_Contrl">
    	<a id="Big_Slide_Last">上一题</a>
        <a id="Big_Slide_Next">下一题</a>
        <a id="testSubmit" type="submit">提交</a>
    </div>
</div>
</body>
</html>